<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>显示生日</title>
</head>
<body>
<%!
	public String getBirthday(String id){
	if(id.length()==18){
	StringBuilder sb = new StringBuilder();
	sb.append(id.substring(6,10)).append("-").append(id.substring(10,12)).append("-").append(id.substring(12,14));
	return sb.toString();
	}else{
	return null;
	}
	}
%>	
	<center>
	<table border="1">
	<tr>
	<td>身份证</td>
	<td>生日</td>
	</tr>
	<tr>
	<td>010020199601026929</td>
	<td><%=getBirthday("010020199601026929")%></td>
	</tr>
	<tr>
	<td>010020199711126928</td>
	<td><%=getBirthday("010020199711126928")%></td>
	</tr>
	</table>
	</center>
	</body>
</html>